package com.naiterui.ehp.bs.cms.modules.oms.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.naiterui.ehp.bs.cms.common.constants.DsName;
import com.naiterui.ehp.bs.cms.modules.oms.entity.Order;
import com.naiterui.ehp.bs.cms.modules.oms.vo.BaseOrderInfoVO;
import com.naiterui.ehp.bs.cms.modules.oms.vo.OrderExcelVO;
import com.naiterui.ehp.bs.cms.modules.oms.vo.OrderRecomVO;
import com.naiterui.ehp.bs.cms.modules.oms.vo.OrderVO;
import com.naiterui.ehp.bs.cms.modules.oms.vo.RefundSelectPayOrder;
import com.naiterui.ehp.bs.cms.modules.oms.vo.StatisticalVO;
import java.util.List;
import org.apache.ibatis.annotations.Param;

@DS(DsName.EHP)
public interface OrderMapper extends BaseMapper<Order> {

    Page<OrderVO> getPage(@Param("page") IPage<OrderVO> page, @Param("ew") Wrapper<OrderVO> entityWrapper);

    List<StatisticalVO> getStatistical(@Param("ew") QueryWrapper<OrderVO> entityWrapper);

    List<OrderVO> getByPatientId(@Param("pateintId") Long pateintId);

    OrderVO getById(@Param("orderId") Long orderId);

    BaseOrderInfoVO getByOrderSn(@Param("orderSn") String orderSn);

    List<RefundSelectPayOrder> getPayOrder(@Param("orderSn") String orderSn);

    List<OrderExcelVO> exportOrder(@Param("ew") Wrapper<OrderVO> entityWrapper);

    List<OrderRecomVO> getOrderRecom(Object[] orderIds);
}
